﻿namespace Autofac.Core
{
    /// <summary>
    ///  Extends <see cref="IModule"/> interface and provides a method to configure child component registries.
    /// </summary>
    public interface IInheritedModule: IModule
    {
        /// <summary>
        /// Apply the module to the newly created component registry of the nested lifetime scope.
        /// </summary>
        /// <param name="componentRegistry">Component registry to apply configuration to.</param>
        /// <remarks>
        ///  You should apply only thouse configuration actions in this method, 
        ///  that are not inherited via ExternalRegistrySource. For example, you can attach to
        ///  events of the newly created <paramref name="componentRegistry"/>.
        /// </remarks>
        void ConfigureChildRegistry(IComponentRegistry componentRegistry);
    }
}